# Contributor: Micheal Smith <xulfer@cheapbsd.net>
# Maintainer: Micheal Smith <xulfer@cheapbsd.net>
pkgname=chiaki
pkgver=2.2.0
pkgrel=0
pkgdesc="Open Source PS4 and PS5 remote play client"
url="https://git.sr.ht/~thestr4ng3r/chiaki"
arch="all !s390x"
license="GPL-3.0-or-later"
makedepends="cmake samurai python3 ffmpeg-dev opus-dev protobuf py3-protobuf
 py3-setuptools protoc sdl2-dev qt5-qtmultimedia-dev qt5-qtsvg-dev openssl-dev"
source="$pkgname-$pkgver-src.tar.gz::https://git.sr.ht/~thestr4ng3r/chiaki/refs/download/v$pkgver/chiaki-v$pkgver-src.tar.gz"
builddir="$srcdir/$pkgname"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
1d9c02911073776047c472043526f27ab53d5a517e4646b8d2c910401dffd20a5aaebe5737c9cb399665e2334e1a75b2528c3d03a200dc88423141f96127897e  chiaki-2.2.0-src.tar.gz
"
